package com.gxs.spring5.config;

import com.gxs.spring5.bean.Person;
import org.springframework.context.annotation.*;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

import javax.naming.ldap.Control;

/**
 * @author 桂贤松
 * @date 2022/2/15
 */
//配置类 == 配置文件
@Configuration //表示这是一个配置类
//@ComponentScan(value = "com.gxs.spring5")
@ComponentScans(value = {
        @ComponentScan(value = "com.gxs.spring5",includeFilters ={
                @ComponentScan.Filter(type = FilterType.ANNOTATION,classes =
                        {Controller.class, Service.class}
                )
        },useDefaultFilters = false)
})
public class MainConfig {

//    @Bean(value = "person01") //表示在容器中注册一个bean,返回类型为方法的返回类型,id默认为方法名
//    public Person person(){
//        return new Person("皮皮桂",25);
//    }
}
